/**
 * 录用通知候选人
 */
import React from 'react';
import { withRouter, router } from 'umi';
import AuthComponent from '@/utils/auth/AuthComponent';
import { NOTICE_TYPE } from '../../dictionary';
import { Icon } from '../../components';

function HireNoticeOperate({ candidateId, employId, noticeType = NOTICE_TYPE.OFFER, ...rest }) {
    const handleJumpNotice = React.useCallback(() => {
        history.push({
            pathname: '/office/personnelManagement/recruitment/candidate/notice',
            query: { candidateId, employId, noticeType }
        });
    }, []);
    return (
        <AuthComponent code="office:recruitment:course:notice">
            <Icon title="再次发送录用邮件" type="icontongzhiyijiejue" onClick={handleJumpNotice} {...rest} />
        </AuthComponent>
    );
}
export default withRouter(HireNoticeOperate);
